#set(title = "留言列表")
#@layoutToo()
#define main()

<table class="table tpl-table table-td-break ">

    <form action="/blog/admin/batchDeleteMsg" method="post">

    <thead>
    <tr>
        <th><input name="" type="checkbox" value="" onclick="swapCheck()"/></th>
        <th width="10%">序列</th>
        <th>昵称</th>
        <th width="50%">留言</th>
        <th >创建时间</th>
        <th>基本操作</th>
    </tr>
    </thead>
    <h3>数量：#(message.totalRow)</h3>
    #if(message.totalRow > 0)
    <tbody>
    #for(message : message.list)
    <tr>
        <th ><input name="List" type="checkbox" value="#(message.id)"/></th>
        <th width="10%" class="">#(for.count)</th>
        <th width="10%" class="">#(message.name)</th>
        <th width="10%" class="">#(message.message)</th>
        <th width="20%" class="">#date(message.createTime)</th>
        <th width="10%" class=""><a href="/blog/admin/deleteMessage?id=#(message.id)">删除</a><th>
    </tr>
    #end
    <tr style="width: 100%">
        <th colspan="7">
        <input type="submit" value="删除" class="btn " id="submit1"/>
    </th>
    </tr>
    </tbody>
    #else
    <p class="center">没有数据...</p>
    #end
</form>

</table>
<script>
    //checkbox 全选/取消全选
    var isCheckAll = false;
    function swapCheck() {
        if (isCheckAll) {
            $("input[type='checkbox']").each(function () {
                this.checked = false;
            });
            isCheckAll = false;
        } else {
            $("input[type='checkbox']").each(function () {
                this.checked = true;
            });
            isCheckAll = true;
        }
    }
</script>
#include("/WEB-INF/view/common/blog_paginate.html")
#@paginate(message.pageNumber, message.totalPage, actionUrl, urlParams)
#end